<template>
  <div style="margin-top:20px">
    <el-form ref="form" label-width="80px" :model="form">
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="字典类型" style="margin-right:15px">
              <el-input v-model="form.type" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="编码" style="margin-right:15px">
              <el-input v-model="form.code" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="名称" style="margin-right:15px">
              <el-input v-model="form.name" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="状态" style="margin-right:15px">
              <el-select v-model="form.status" disabled>
                <el-option v-for="item in statusList" :key="item.value" :label="item.label" :value="item.value" />
              </el-select>
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="备注" style="margin-right:15px">
              <el-input v-model="form.remark" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="排序" style="margin-right:15px">
              <el-input v-model="form.sort" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
    </el-form>
  </div>
</template>
<script>
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'
import request from '@/utils/request'
Vue.use(VXETable)
export default {
  name: 'Child',
  data() {
    return {
      form: {
        type: '',
        code: '',
        name: '',
        status: '',
        remark: '',
        sort: ''
      },
      // 状态
      statusList: [
        { label: '正常', value: 0 },
        { label: '停用', value: 1 }
      ]
    }
  },
  created() {},
  methods: {
    // 获取页面信息
    getInfo(code) {
      this.$refs['form'].resetFields()
      request({ url: `/arpa-basic-api/dict/${code}`, method: 'get' }).then(response => {
        this.form = response.data
      })
    }
  }
}
</script>
<style lang="scss" scoped>
    .dialog-footer {
        margin-top: 50px;
    }
</style>
